package com.neighbor.neighborhoodadmin.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.math.BigDecimal;
import java.util.Date;
import lombok.Getter;
import lombok.Setter;

/**
 * <p>
 * 物品交易订单表
 * </p>
 *
 * @author song
 * @since 2025-09-22 09:11:23
 */
@Getter
@Setter
@TableName("item_orders")
public class ItemOrders {

    /**
     * 订单唯一ID
     */
    @TableId(value = "order_id", type = IdType.AUTO)
    private Integer orderId;

    /**
     * 订单号
     */
    @TableField("order_number")
    private String orderNumber;

    /**
     * 物品ID
     */
    @TableField("item_id")
    private Integer itemId;

    /**
     * 买方/租方ID
     */
    @TableField("buyer_id")
    private Integer buyerId;

    /**
     * 卖方/出租方ID
     */
    @TableField("seller_id")
    private Integer sellerId;

    /**
     * 类型(1:出售,2:出租)
     */
    @TableField("type")
    private Byte type;

    /**
     * 交易价格
     */
    @TableField("price")
    private BigDecimal price;

    /**
     * 数量(出售)
     */
    @TableField("quantity")
    private Integer quantity;

    /**
     * 租赁天数
     */
    @TableField("rent_days")
    private Integer rentDays;

    /**
     * 租赁开始日期
     */
    @TableField("start_date")
    private Date startDate;

    /**
     * 租赁结束日期
     */
    @TableField("end_date")
    private Date endDate;

    /**
     * 状态(1:待确认,2:进行中,3:已完成,4:已取消)
     */
    @TableField("status")
    private Byte status;

    /**
     * 创建时间
     */
    @TableField("created_at")
    private Date createdAt;

    /**
     * 更新时间
     */
    @TableField("updated_at")
    private Date updatedAt;
}
